<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;stdio.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_008_871">&nbsp;</a>NAME</h4><blockquote>
stdio.h - standard buffered input/output
</blockquote><h4><a name = "tag_000_008_872">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;stdio.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_008_873">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;stdio.h&gt;</i>
header defines the following macro names as positive
integral constant expressions:
<dl compact>

<dt>BUFSIZ<dd>
Size of
<i>&lt;stdio.h&gt;</i>
buffers.

<dt>FILENAME_MAX<dd>
Maximum size in bytes of the longest
filename string that the implementation
guarantees can be opened.

<dt>FOPEN_MAX<dd>
Number of streams which the implementation
guarantees can be open simultaneously.
The value will be at least eight.

<dt>_IOFBF<dd>
Input/output fully buffered.

<dt>_IOLBF<dd>
Input/output line buffered.

<dt>_IONBF<dd>
Input/output unbuffered.

<dt>L_ctermid<dd>
Maximum size of character
array to hold
<i>ctermid</i>()
output.

<dt>L_cuserid<dd>
Maximum size of character
array to hold
<i>cuserid</i>()
output. <b>(LEGACY)</b>

<dt>L_tmpnam<dd>
Maximum size of character
array to hold <i>tmpnam</i>() output.

<dt>SEEK_CUR<dd>
Seek relative to current position.

<dt>SEEK_END<dd>
Seek relative to end-of-file.

<dt>SEEK_SET<dd>
Seek relative to start-of-file.

<dt>TMP_MAX<dd>
Minimum number of unique filenames
generated by
<i>tmpnam</i>().
Maximum number of times an application can call
<i>tmpnam</i>()
reliably.
The value of TMP_MAX will be at least 10,000.

</dl>
<p>
The following macro name is defined as a
negative integral constant expression:
<dl compact>

<dt>EOF<dd>
End-of-file return value.

</dl>
<p>
The following macro name is defined as a
null pointer constant:
<dl compact>

<dt>NULL<dd>
Null pointer.

</dl>
<p>
The following macro name is defined as a
string constant:
<dl compact>

<dt>P_tmpdir<dd>
default directory prefix for
<i>tempnam</i>().

</dl>
<p>
The following macro names are defined as
expressions of type pointer to FILE:
<dl compact>

<dt>stderr<dd>
Standard error output stream.

<dt>stdin<dd>
Standard input stream.

<dt>stdout<dd>
Standard output stream.

</dl>
<p>
The following data types are defined through <b>typedef</b>:
<dl compact>

<dt><b>FILE</b><dd><index term="data type, FILE"></index>
A structure containing information about a file.

<dt><b>fpos_t</b><dd><index term="data type, fpos_t"></index>
Type containing all information needed to specify uniquely
every position within a file.

<dt><b>va_list</b><dd>As described in
<i><a href="stdarg.h.html">&lt;stdarg.h&gt;</a></i>.

<dt><b>size_t</b><dd>As described in
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>.

</dl>
<p>
The following are declared as functions and may also be defined
as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
void     <a href="clearerr.html">clearerr</a>(FILE *);
char    *<a href="ctermid.html">ctermid</a>(char *);
char    *<a href="cuserid.html">cuserid</a>(char *);<b>(LEGACY)</b>
int      <a href="fclose.html">fclose</a>(FILE *);
FILE    *<a href="fdopen.html">fdopen</a>(int, const char *);
int      <a href="feof.html">feof</a>(FILE *);
int      <a href="ferror.html">ferror</a>(FILE *);
int      <a href="fflush.html">fflush</a>(FILE *);
int      <a href="fgetc.html">fgetc</a>(FILE *);
int      <a href="fgetpos.html">fgetpos</a>(FILE *, fpos_t *);
char    *<a href="fgets.html">fgets</a>(char *, int, FILE *);
int      <a href="fileno.html">fileno</a>(FILE *);
void     <a href="flockfile.html">flockfile</a>(FILE *);
FILE    *<a href="fopen.html">fopen</a>(const char *, const char *);
int      <a href="fprintf.html">fprintf</a>(FILE *, const char *, ...);
int      <a href="fputc.html">fputc</a>(int, FILE *);
int      <a href="fputs.html">fputs</a>(const char *, FILE *);
size_t   <a href="fread.html">fread</a>(void *, size_t, size_t, FILE *);
FILE    *<a href="freopen.html">freopen</a>(const char *, const char *, FILE *);
int      <a href="fscanf.html">fscanf</a>(FILE *, const char *, ...);
int      <a href="fseek.html">fseek</a>(FILE *, long int, int);
int      <a href="fseeko.html">fseeko</a>(FILE *, off_t, int);
int      <a href="fsetpos.html">fsetpos</a>(FILE *, const fpos_t *);
long int <a href="ftell.html">ftell</a>(FILE *);
off_t    <a href="ftello.html">ftello</a>(FILE *);
int      <a href="ftrylockfile.html">ftrylockfile</a>(FILE *);
void     <a href="funlockfile.html">funlockfile</a>(FILE *);
size_t   <a href="fwrite.html">fwrite</a>(const void *, size_t, size_t, FILE *);
int      <a href="getc.html">getc</a>(FILE *);
int      <a href="getchar.html">getchar</a>(void);
int      <a href="getc_unlocked.html">getc_unlocked</a>(FILE *);
int      <a href="getchar_unlocked.html">getchar_unlocked</a>(void);
int      <a href="getopt.html">getopt</a>(int, char * const[], const char); <b>(LEGACY)</b>
char    *<a href="gets.html">gets</a>(char *);
int      <a href="getw.html">getw</a>(FILE *);
int      <a href="pclose.html">pclose</a>(FILE *);
void     <a href="perror.html">perror</a>(const char *);
FILE    *<a href="popen.html">popen</a>(const char *, const char *);
int      <a href="printf.html">printf</a>(const char *, ...);
int      <a href="putc.html">putc</a>(int, FILE *);
int      <a href="putchar.html">putchar</a>(int);
int      <a href="putc_unlocked.html">putc_unlocked</a>(int, FILE *);
int      <a href="putchar_unlocked.html">putchar_unlocked</a>(int);
int      <a href="puts.html">puts</a>(const char *);
int      <a href="putw.html">putw</a>(int, FILE *);
int      <a href="remove.html">remove</a>(const char *);
int      <a href="rename.html">rename</a>(const char *, const char *);
void     <a href="rewind.html">rewind</a>(FILE *);
int      <a href="scanf.html">scanf</a>(const char *, ...);
void     <a href="setbuf.html">setbuf</a>(FILE *, char *);
int      <a href="setvbuf.html">setvbuf</a>(FILE *, char *, int, size_t);
int      <a href="snprintf.html">snprintf</a>(char *, size_t, const char *, ...);
int      <a href="sprintf.html">sprintf</a>(char *, const char *, ...);
int      <a href="sscanf.html">sscanf</a>(const char *, const char *, int ...);
char    *<a href="tempnam.html">tempnam</a>(const char *, const char *);
FILE    *<a href="tmpfile.html">tmpfile</a>(void);
char    *<a href="tmpnam.html">tmpnam</a>(char *);
int      <a href="ungetc.html">ungetc</a>(int, FILE *);
int      <a href="vfprintf.html">vfprintf</a>(FILE *, const char *, va_list);
int      <a href="vprintf.html">vprintf</a>(const char *, va_list);
int      <a href="vsnprintf.html">vsnprintf</a>(char *, size_t, const char *, va_list);
int      <a href="vsprintf.html">vsprintf</a>(char *, const char *, va_list);
</code>
</pre>
<p>
The following external variables are defined:
<pre>
<code>
extern char  *optarg;    )
extern int    opterr;    )
extern int    optind;    ) <b>(LEGACY)</b>
extern int    optopt;    )
</code>
</pre>
<p>
Inclusion of the
<i>&lt;stdio.h&gt;</i>
header may also make visible all symbols from
<i><a href="stddef.h.html">&lt;stddef.h&gt;</a></i>.
</blockquote><h4><a name = "tag_000_008_874">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_875">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_876">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="clearerr.html">clearerr()</a></i>,
<i><a href="ctermid.html">ctermid()</a></i>,
<i><a href="cuserid.html">cuserid()</a></i>,
<i><a href="fclose.html">fclose()</a></i>,
<i><a href="fdopen.html">fdopen()</a></i>,
<i><a href="fgetc.html">fgetc()</a></i>,
<i><a href="fgetpos.html">fgetpos()</a></i>,
<i><a href="ferror.html">ferror()</a></i>,
<i><a href="feof.html">feof()</a></i>,
<i><a href="fflush.html">fflush()</a></i>,
<i><a href="fgets.html">fgets()</a></i>,
<i><a href="fileno.html">fileno()</a></i>,
<i><a href="fopen.html">fopen()</a></i>,
<i><a href="fputc.html">fputc()</a></i>,
<i><a href="fputs.html">fputs()</a></i>,
<i><a href="fread.html">fread()</a></i>,
<i><a href="freopen.html">freopen()</a></i>,
<i><a href="fseek.html">fseek()</a></i>,
<i><a href="fsetpos.html">fsetpos()</a></i>,
<i><a href="ftell.html">ftell()</a></i>,
<i><a href="fwrite.html">fwrite()</a></i>,
<i><a href="getc.html">getc()</a></i>,
<i><a href="getc_unlocked.html">getc_unlocked()</a></i>,
<i><a href="getwchar.html">getwchar()</a></i>,
<i><a href="getchar.html">getchar()</a></i>,
<i><a href="getopt.html">getopt()</a></i>,
<i><a href="gets.html">gets()</a></i>,
<i><a href="pclose.html">pclose()</a></i>,
<i><a href="perror.html">perror()</a></i>,
<i><a href="popen.html">popen()</a></i>,
<i><a href="printf.html">printf()</a></i>,
<i><a href="putc.html">putc()</a></i>,
<i><a href="putchar.html">putchar()</a></i>,
<i><a href="puts.html">puts()</a></i>,
<i><a href="putwchar.html">putwchar()</a></i>,
<i><a href="remove.html">remove()</a></i>,
<i><a href="rename.html">rename()</a></i>,
<i><a href="rewind.html">rewind()</a></i>,
<i><a href="scanf.html">scanf()</a></i>,
<i><a href="setbuf.html">setbuf()</a></i>,
<i><a href="setvbuf.html">setvbuf()</a></i>,
<i><a href="sscanf.html">sscanf()</a></i>,
<i><a href="stdin.html">stdin</a></i>,
<i><a href="system.html">system()</a></i>,
<i><a href="tempnam.html">tempnam()</a></i>,
<i><a href="tmpfile.html">tmpfile()</a></i>,
<i><a href="tmpnam.html">tmpnam()</a></i>,
<i><a href="ungetc.html">ungetc()</a></i>,
<i><a href="vprintf.html">vprintf()</a></i>,
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
